/*
 * Title:        CloudScheduler Toolkit
 * Description:  a Toolkit for Modeling and Simulation of Job Scheduling and Resource Provisioning in Cloud System
 * Licence:      GPL - http://www.gnu.org/copyleft/gpl.html
 * Author:       Fuhui Wu
 *
 * Copyright (c) 2013-2014, The National University of Defense Technology, China
 */

package org.nudt.jCloud.example.basic;

import java.util.Set;

import org.jgrapht.graph.DefaultWeightedEdge;
import org.nudt.jCloud.workflow.Workflow;
import org.nudt.jCloud.workflow.WorkflowGenFromXML;

public class WorkflowTest {

	public static void main(String[] args) {
		WorkflowGenFromXML workflowGen = new WorkflowGenFromXML("data/Montage_25.xml", 20);
		Workflow workflow = workflowGen.generate();
		System.out.println(workflow.getDAG().toString());
		Set<DefaultWeightedEdge> edgeSet = workflow.getDAG().incomingEdgesOf(workflow.getNode("ID00014"));
		for(DefaultWeightedEdge edge : edgeSet){
			System.out.println(edge.toString()+"\t"+workflow.getDAG().getEdgeWeight(edge));			
		}
	}

}
